//
//  kata_Button.m
//  CityStar
//
//  Created by wangjia on 14-7-12.
//  Copyright (c) 2014年 kata. All rights reserved.
//

#import "kata_Button.h"
#import "imageUtil.h"
#import "HTDefine.h"

@implementation kata_Button

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

- (void)awakeFromNib{
    [self setBackgroundImage:[imageUtil imageWithColor:rgba(251, 185, 92, 1)] forState:UIControlStateNormal];
    [self setBackgroundImage:[imageUtil imageWithColor:rgba(245, 188, 106, 1)] forState:UIControlStateHighlighted];
    self.layer.masksToBounds = YES;
    self.layer.cornerRadius = 4.0;
    
    [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self setTitleShadowColor:[UIColor whiteColor] forState:UIControlStateNormal];
    
    [self setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
    [self setTitleShadowColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
    
    [self setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
    [self setTitleShadowColor:[UIColor whiteColor] forState:UIControlStateSelected];
}

- (void)setGrayStyle{
    [self setBackgroundImage:[imageUtil imageWithColor:rgba(130, 130, 130, 1)] forState:UIControlStateNormal];
    [self setBackgroundImage:[imageUtil imageWithColor:rgba(130, 130, 130, 1)] forState:UIControlStateHighlighted];
}

@end
